package org.example.dbcompare.model.config;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
import java.util.Set;

/**
 * @author wuyong
 * @date 2025/10/30
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ExportSqlConfig {
    /**
     * 忽略表是否存在的表集合
     */
    private List<String> ignoreTables;
    /**
     * 表名匹配模式（支持通配符）
     * 例如：["temp_*", "*_backup", "log_*"]
     */
    private List<String> ignoreTablePatterns;
    @Builder.Default
    private boolean exportTable = true;
    /**
     * 是否导出缺失的列
     */
    @Builder.Default
    private boolean exportMissingColumn = true;
    /**
     * 是否导出不同的列
     */
    @Builder.Default
    private boolean exportDifferentColumn = true;
    /**
     * 是否包含表注释
     */
    @Builder.Default
    private boolean includeTableComment = true;

    /**
     * 是否包含列注释
     */
    @Builder.Default
    private boolean includeColumnComment = true;

    /**
     * 是否包含索引
     */
    @Builder.Default
    private boolean includeIndexes = true;

    /**
     * 是否包含外键
     */
    @Builder.Default
    private boolean includeForeignKeys = true;

    /**
     * 表引擎类型
     */
    @Builder.Default
    private String engine = "InnoDB";

    /**
     * 字符集
     */
    @Builder.Default
    private String charset = "utf8mb4";

    /**
     * 排序规则
     */
    @Builder.Default
    private String collation = "utf8mb4_unicode_ci";

    /**
     * 是否生成DROP语句
     */
    @Builder.Default
    private boolean generateDropStatements = false;

    /**
     * 是否生成ALTER语句
     */
    @Builder.Default
    private boolean generateAlterStatements = true;
}
